<template>
  <div class="header">
    <div class="header-left" @click.stop="hidden"></div>
    <div class="header-title">
      <h3>{{this.currentSong.name}}</h3>
      <p>{{this.currentSong.singer}}</p>
    </div>
    <div class="header-right"></div>
  </div>
</template>

<script>
import { mapActions, mapGetters } from 'vuex'
export default {
  name: 'PlayerHeader',
  data () {
    return {
    }
  },
  computed: {
    ...mapGetters([
      'currentSong'
    ])
  },
  methods: {
    ...mapActions([
      'setFullPlayer',
      'setMiniPlayer'
    ]),
    hidden () {
      this.setFullPlayer(false)
      this.setMiniPlayer(true)
    }
  },
  props: {
    // title: {
    //   type: String,
    //   default: '',
    //   required: true
    // }
  }
}
</script>

<style scoped lang='scss'>
  @import '../../assets/css/variable.scss';
  @import '../../assets/css/mixin.scss';
  .header {
    width: 100%;
    // @include bg_color();
    height: 100px;
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 999;
    .header-left, .header-right {
      width: 84px;
      height: 84px;
      margin-top: 8px;
    }
    .header-left{
      @include bg_img('../../assets/images/down');
    }
    .header-title {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      text-align: center;
      color: #fff;
      @include font_size($font_medium_s);
      @include no-wrap();
      /* @include font_color(); */
    }
  }
</style>
